import { ChatArea } from "../ChatArea";
import { ChatType } from "./ChatType";
import { ChatCellData } from "./ChatCellData";
import { ChatStyle } from "../chatPanel/ChatStyle";
import { FilterText } from "../../../../../com/gengine/utils/FilterText";
import { ResManager } from "../../../../common/ResManager";
import { FaceAuthority } from "../data/FaceAuthority";
import { ObjectPool } from "../../../../../com/gengine/utils/pools/ObjectPool";
import { CellDataType } from "./CellDataType";
import { StringUtil } from "../../../../../mx/utils/StringUtil";
import { SPetInfo } from "../../../../../Message/Game/SPetInfo";
import { Language } from "../../../../../extend/language/Language";
import { SPublicNotice } from "../../../../../Message/Public/SPublicNotice";
import { PlayerAndItem } from "../item/PlayerAndItem";
import { PlayerMiniInfo } from "../../../model/PlayerMiniInfo";
import { SPublicMiniPlayer } from "../../../../../Message/Public/SPublicMiniPlayer";
import { ColorConfig } from "../../../resource/ColorConfig";
import { ItemData } from "../../../resource/info/ItemData";
import { SPlayerItem } from "../../../../../Message/Public/SPlayerItem";
import { Cache } from "../../../cache/Cache";
import { PlayerUtil } from "../../common/util/PlayerUtil";
import { PetBloodLineConfig } from "../../../resource/PetBloodLineConfig";
import { SIslandPos } from "../../../../../Message/Game/SIslandPos";
import { HTMLUtil } from "../../../../../com/gengine/utils/HTMLUtil";
import { GameDefConfig } from "../../../resource/GameDefConfig";
import { ECategory } from "../../../../../Message/Public/ECategory";
import { ItemDataWorking } from "./ItemDataWorking";
import { EShowArea } from "../../../../../Message/Public/EShowArea";
import { SEntityId } from "../../../../../Message/Public/SEntityId";
import { SystemSetter } from "../../system/SystemSetter";
import { NPCConfig } from "../../../resource/NPCConfig";
import { PetColor } from "../../pet/info/PetColor";
import { EPrictUnit } from "../../../../../Message/Public/EPrictUnit";
import { EntityUtil } from "../../../scene/layer/utils/EntityUtil";
import { PropertiesMsgConfig } from "../../../resource/PropertiesMsgConfig";
import { GameMapUtil } from "../../../scene/map/GameMapUtil";
import { EPlayerItemPosType } from "../../../../../Message/Public/EPlayerItemPosType";
import { GlobalStyle } from "../../../../common/global/GlobalStyle";
import { ChatShowPoint } from "../data/ChatShowPoint";
import { Vector } from "../../../../../__AS3__/vec/Vector";
import { Complex } from "../../../../../ChatArea/Complex";
import { World } from "../../../../../ChatArea/World";
import { Country } from "../../../../../ChatArea/Country";
import { Union } from "../../../../../ChatArea/Union";
import { Team } from "../../../../../ChatArea/Team";
import { Scene } from "../../../../../ChatArea/Scene";
import { Force } from "../../../../../ChatArea/Force";
import { CrossGrop } from "../../../../../ChatArea/CrossGrop";
import { CrossGroup } from "../../../../../ChatType/CrossGroup";
import { Group } from "../../../../../ChatArea/Group";
import { GuildUnion } from "../../../../../ChatArea/GuildUnion";
type int = number;
//class ChatMessageWorking
    
    export  class ChatMessageWorking
    {
        

        public static getChatTypeByAreaName(arg1: string): string
        {
            var loc1=arg1;
            switch (loc1) 
            {
                case ChatArea.World:
                {
                    return ChatType.World;
                }
                case ChatArea.Country:
                {
                    return ChatType.State;
                }
                case ChatArea.Scene:
                {
                    if (chatChannelsData.indexOf(ChatMessageWorking.crossObj) > -1) 
                    {
                        return ChatType.CrossServer;
                    }
                    return ChatType.Scene;
                }
                case ChatArea.Union:
                {
                    return ChatType.Union;
                }
                case ChatArea.Team:
                {
                    return ChatType.Team;
                }
                case ChatArea.Secret:
                {
                    return ChatType.Secret;
                }
                case ChatArea.Speaker:
                {
                    return ChatType.Speaker;
                }
                case ChatArea.Force:
                {
                    return ChatType.Force;
                }
                case ChatArea.CrossGrop:
                {
                    return ChatType.CrossGroup;
                }
                case ChatArea.Group:
                {
                    return ChatType.Group;
                }
                case ChatArea.GuildUnion:
                {
                    return ChatType.GuildUnion;
                }
                default:
                {
                    return ChatType.World;
                }
            }
        }

        public static getCellDataByContent(arg1: string, arg2: int=-1, arg3: Boolean=true, arg4: int=12, arg5: int=3): Vector.<ChatCellData>
        {
            var loc6=false;
            var loc7=null;
            var loc8=null;
            var loc9=null;
            if (arg2 == -1) 
            {
                arg2 = ChatStyle.getChatContentColor();
            }
            if (arg3) 
            {
                arg1 = FilterText.instance.getFilterStr(arg1);
            }
            if (arg1.length == 0) 
            {
                return new Vector.<ChatCellData>();
            }
            var loc1=0;
            var loc2=0;
            var loc3=new Vector.<ChatCellData>();
            var loc4=0;
            var loc5=0;
            if (ResManager.instance.isFaceLoaded || ResManager.instance.isFaceVIPLoaded) 
            {
                while (loc5 < (arg1.length - 1)) 
                {
                    if (!(loc1 >= ChatMessageWorking.maxFaceNum)) 
                    {
                    };
                    loc5 = arg1.indexOf("/", loc5);
                    loc6 = false;
                    if (!(loc5 < 0)) 
                    {
                    };
                    if (arg1.charAt(loc5 + 1) == "/") 
                    {
                        loc5 = loc5 + 2;
                        continue;
                    }
                    if (ResManager.instance.isFaceLoaded && arg5 | FaceAuthority.NORMAL) 
                    {
                        var loc10=0;
                        var loc11=faceList;
                        for(loc7 of loc11) 
                        {
                            if (arg1.indexOf(loc7, loc5) != loc5) 
                            {
                                continue;
                            }
                            loc6 = true;
                            if (loc5 > loc4) 
                            {
                                (loc8 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc4, loc5).replace("//", "/"));
                                loc8.elementFormat = ChatStyle.getContentFormat(arg2, arg4);
                                loc3.push(loc8);
                            }
                            (loc9 = ObjectPool.getObject(ChatCellData)).init(CellDataType.MovieClip);
                            loc9.className = "a" + (int(StringUtil.trim(loc7.substring(1))) - 1);
                            loc9.text = loc7;
                            loc9.elementFormat = ChatStyle.getFaceFormat(arg4);
                            loc3.push(loc9);
                            loc5 = loc4 = loc5 + loc7.length;
                            ++loc1;
                            ++loc2;
                            break;
                        }
                    }
                    if (loc2 < ChatMessageWorking.maxVIPFaceNum && ResManager.instance.isFaceVIPLoaded && arg5 & FaceAuthority.VIP) 
                    {
                        loc10 = 0;
                        loc11 = vipFaceList;
                        for(loc7 of loc11) 
                        {
                            if (arg1.indexOf(loc7, loc5) != loc5) 
                            {
                                continue;
                            }
                            loc6 = true;
                            if (loc5 > loc4) 
                            {
                                (loc8 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc4, loc5).replace("//", "/"));
                                loc8.elementFormat = ChatStyle.getContentFormat(arg2, arg4);
                                loc3.push(loc8);
                            }
                            (loc9 = ObjectPool.getObject(ChatCellData)).init(CellDataType.MovieClip);
                            loc9.className = loc7.substring(1, 2) + (int(StringUtil.trim(loc7.substring(2))) - 1);
                            loc9.text = loc7;
                            loc9.elementFormat = ChatStyle.getVIPFaceFormat(arg4);
                            loc3.push(loc9);
                            loc5 = loc4 = loc5 + loc7.length;
                            ++loc1;
                            ++loc2;
                            break;
                        }
                    }
                    if (loc6) 
                    {
                        continue;
                    }
                    ++loc5;
                }
            }
            if (loc4 < arg1.length) 
            {
                (loc8 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc4).replace("//", "/"));
                loc8.elementFormat = ChatStyle.getContentFormat(arg2, arg4);
                loc3.push(loc8);
            }
            return loc3;
        }

        public static getCellDatasFilterHtml(arg1: string, arg2: int=-1, arg3: Array<any>=null, arg4: int=12): Vector.<ChatCellData>
        {
            var loc2=null;
            var loc11=null;
            var loc12=null;
            var loc13=null;
            if (!arg3) 
            {
                arg3 = [];
            }
            if (arg2 == -1) 
            {
                arg2 = ChatStyle.getChatContentColor();
            }
            arg1 = arg1.replace("\n", "");
            arg1 = arg1.replace("\r", "");
            var loc1=new Vector.<ChatCellData>();
            if (arg1.length == 0) 
            {
                return loc1;
            }
            var loc3=0;
            var loc4=0;
            var loc5=0;
            var loc6=0;
            while (loc4 < arg1.length - 10) 
            {
                if ((loc4 = arg1.indexOf("<a href=\"", loc4)) < 0) 
                {
                    break;
                }
                loc5 = loc4 + 9;
                if ((loc5 = arg1.indexOf("\"", loc5)) < 0) 
                {
                    loc4 = loc4 + 9;
                    continue;
                }
                loc11 = arg1.substring(loc4 + 9, loc5);
                loc6 = loc5;
                if ((loc5 = arg1.indexOf(">", loc5)) < 0) 
                {
                    loc4 = loc4 + 9;
                    continue;
                }
                if ((loc6 = arg1.indexOf("</a>", loc5)) < 0) 
                {
                    loc4 = loc4 + 9;
                    continue;
                }
                loc12 = arg1.substring(loc5 + 1, loc6);
                if (loc4 > loc3) 
                {
                    loc2 = ChatMessageWorking.getCellDataByContent(arg1.substring(loc3, loc4), arg2, false, arg4);
                    loc1 = loc1.concat(loc2);
                }
                (loc13 = ObjectPool.getObject(ChatCellData)).elementFormat = ChatStyle.getLinkFormat(arg4);
                loc13.init(CellDataType.LINK);
                loc13.text = loc12;
                loc13.linkUrl = loc11;
                loc1.push(loc13);
                loc4 = loc3 = loc6 + 4;
            }
            if (loc3 < arg1.length) 
            {
                loc2 = ChatMessageWorking.getCellDataByContent(arg1.substring(loc3), arg2, false, arg4);
                loc1 = loc1.concat(loc2);
            }
            var loc7=new Vector.<ChatCellData>();
            var loc8=0;
            while (loc8 < loc1.length) 
            {
                if (loc1[loc8].type != CellDataType.GENERAL) 
                {
                    loc7.push(loc1[loc8]);
                }
                else 
                {
                    loc7 = loc7.concat(ChatMessageWorking.getCellDatasByAnalyzeRumor(loc1[loc8].text, arg3, loc1[loc8].elementFormat.color, false, -1, arg4));
                }
                ++loc8;
            }
            var loc9=new Vector.<ChatCellData>();
            var loc10=0;
            while (loc10 < loc7.length) 
            {
                if (loc7[loc10].type != CellDataType.GENERAL) 
                {
                    loc9.push(loc7[loc10]);
                }
                else 
                {
                    loc9 = loc9.concat(ChatMessageWorking.getCellDatasFilterFont(loc7[loc10].text, loc7[loc10].elementFormat.color, arg4));
                }
                ++loc10;
            }
            return loc9;
        }

        public static getCellDatasFilterFont(arg1: string, arg2: int=-1, arg3: int=12): Vector.<ChatCellData>
        {
            var loc2=null;
            var loc3=null;
            var loc8=null;
            var loc9=null;
            var loc10=null;
            if (arg2 == -1) 
            {
                arg2 = ChatStyle.getChatContentColor();
            }
            arg1 = arg1.replace("\n", "");
            arg1 = arg1.replace("\r", "");
            var loc1=new Vector.<ChatCellData>();
            if (arg1.length == 0) 
            {
                return loc1;
            }
            var loc4=0;
            var loc5=0;
            var loc6=0;
            var loc7=0;
            while (loc5 < arg1.length - 15) 
            {
                if ((loc5 = arg1.indexOf("<font color=\"", loc5)) < 0) 
                {
                    break;
                }
                loc6 = loc5 + 13;
                if ((loc6 = arg1.indexOf("\"", loc6)) < 0) 
                {
                    loc5 = loc5 + 13;
                    continue;
                }
                loc8 = arg1.substring(loc5 + 13, loc6);
                loc7 = loc6;
                if ((loc6 = arg1.indexOf(">", loc6)) < 0) 
                {
                    loc5 = loc5 + 13;
                    continue;
                }
                if ((loc7 = arg1.indexOf("</font>", loc6)) < 0) 
                {
                    loc5 = loc5 + 13;
                    continue;
                }
                loc9 = arg1.substring(loc6 + 1, loc7);
                if (loc5 > loc4) 
                {
                    (loc2 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc4, loc5));
                    loc2.elementFormat = ChatStyle.getContentFormat(arg2, arg3);
                    loc1.push(loc2);
                }
                (loc10 = ObjectPool.getObject(ChatCellData)).elementFormat = ChatStyle.getContentFormat(parseInt(loc8.substr(1)), arg3);
                loc10.init(CellDataType.GENERAL, loc9);
                loc1.push(loc10);
                loc5 = loc4 = loc7 + 7;
            }
            if (loc4 < arg1.length) 
            {
                (loc2 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc4));
                loc2.elementFormat = ChatStyle.getContentFormat(arg2, arg3);
                loc1.push(loc2);
            }
            return loc1;
        }

        public static getPetName(arg1: SPetInfo): string
        {
            var loc2=null;
            var loc1="";
            if (arg1.gene != 1) 
            {
                if (arg1.gene == 2) 
                {
                    loc1 = Language.getString(40645);
                }
            }
            else 
            {
                loc1 = Language.getString(40644);
            }
            loc2 = loc1 + arg1.typeName + "·" + arg1.name;
            return loc2;
        }

        public static getPlayerAndItem(arg1: SPublicNotice): PlayerAndItem
        {
            var loc1=new PlayerAndItem();
            var loc2=arg1.publicMiniplayers;
            if (loc2.length > 0) 
            {
                loc1.player = new PlayerMiniInfo(loc2[0] as SPublicMiniPlayer);
            }
            loc1.itemDatas = ChatMessageWorking.getItem(ChatMessageWorking.getNoticeContent(arg1));
            return loc1;
        }

        public static getPlayerCellData(arg1: PlayerMiniInfo, arg2: int=12): Vector.<ChatCellData>
        {
            var loc4=null;
            var loc5=null;
            var loc1=0;
            var loc2=new Vector.<ChatCellData>();
            if (arg1.isGM) 
            {
                (loc4 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GM, "[GM]");
                loc4.elementFormat = ChatStyle.getGMFormat(arg2);
                loc2.push(loc4);
            }
            if (arg1.isGuide) 
            {
                (loc5 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Guide, Language.getString(40641));
                loc5.elementFormat = ChatStyle.getGMFormat(arg2);
                loc2.push(loc5);
            }
            var loc3;
            (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.PLAYER, "[" + arg1.playerName + "]");
            loc1 = ColorConfig.instance.getCampColor(arg1.camp).intColor;
            loc3.elementFormat = ChatStyle.getPlayerNameFormat(loc1, arg2);
            loc3.data = arg1;
            loc2.push(loc3);
            return loc2;
        }

        public static getItem(arg1: string): Vector.<ItemData>
        {
            var loc6=null;
            var loc7=null;
            var loc8=null;
            var loc9=0;
            var loc10=null;
            var loc11=null;
            var loc12=null;
            if (!arg1) 
            {
                return null;
            }
            var loc1=new Vector.<ItemData>();
            arg1 = arg1.replace("\n", "");
            arg1 = arg1.replace("\r", "");
            var loc2=0;
            var loc3=0;
            var loc4=0;
            var loc5=0;
            label436: while (loc3 < arg1.length - 17) 
            {
                loc5 = (loc3 = arg1.indexOf("<MsgObj>", loc3)) + 8;
                if (loc3 < 0) 
                {
                    break;
                }
                loc6 = new Array<any>();
                if ((loc4 = arg1.indexOf("</MsgObj>", loc5)) < 0) 
                {
                    break;
                }
                if ((loc7 = arg1.substring(loc5, loc4)).length < 0) 
                {
                    loc3 = loc4 + 9;
                    continue;
                }
                loc8 = (loc6 = loc7.split(",")).shift();
                var loc13=loc8;
                switch (loc13) 
                {
                    case "ITEM":
                    {
                        if (loc6.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label436;
                        }
                        loc9 = int(loc6.shift());
                        loc10 = "";
                        if (loc6.length > 0) 
                        {
                            loc10 = loc6.join(",");
                        }
                        (loc11 = new SPlayerItem()).itemAmount = 1;
                        loc11.itemCode = loc9;
                        loc11.jsStr = loc10;
                        loc11.playerId = 0;
                        loc11.posType = 0;
                        loc11.uid = "";
                        loc12 = new ItemData(loc11);
                        loc1.push(loc12);
                    }
                    default:
                    {
                        loc3 = loc4 + 9;
                        continue label436;
                    }
                }
            }
            return loc1;
        }

        public static getCellDatasByAnalyzeRumor(arg1: string, arg2: Array<any>, arg3: int=-1, arg4: Boolean=false, arg5: int=-1, arg6: int=12): Vector.<ChatCellData>
        {
            var loc6=null;
            var loc7=null;
            var loc8=null;
            var loc9=null;
            var loc10=null;
            var loc11=0;
            var loc12=0;
            var loc13=0;
            var loc14=0;
            var loc15=0;
            var loc16=null;
            var loc17=0;
            var loc18=0;
            var loc19=null;
            var loc20=0;
            var loc21=0;
            var loc22=null;
            var loc23=null;
            var loc24=0;
            var loc25=false;
            var loc26=0;
            var loc27=0;
            var loc28=null;
            var loc29=null;
            var loc30=null;
            var loc31=0;
            var loc32=null;
            var loc33=0;
            var loc34=null;
            var loc35=null;
            var loc36=null;
            var loc37=0;
            var loc38=null;
            var loc39=null;
            var loc40=null;
            var loc41=null;
            var loc42=null;
            var loc43=null;
            var loc44=null;
            var loc45=0;
            var loc46=null;
            var loc47=0;
            var loc48=null;
            var loc49=null;
            var loc50=0;
            var loc51=null;
            var loc52=null;
            var loc53=null;
            var loc54=null;
            var loc55=null;
            var loc56=null;
            var loc57=0;
            var loc58=null;
            var loc59=0;
            var loc60=null;
            var loc61=null;
            var loc62=null;
            var loc63=null;
            var loc64=0;
            var loc65=null;
            var loc66=null;
            var loc67=0;
            var loc68=null;
            var loc69=0;
            var loc70=0;
            var loc71=null;
            var loc72=0;
            var loc73=null;
            var loc74=0;
            var loc75=0;
            var loc76=0;
            var loc77=null;
            var loc78=null;
            var loc79=null;
            var loc80=0;
            var loc81=0;
            var loc82=null;
            var loc83=null;
            var loc84=null;
            var loc85=null;
            var loc86=null;
            var loc87=null;
            var loc88=0;
            var loc89=null;
            var loc90=null;
            var loc91=null;
            var loc92=null;
            var loc93=null;
            var loc94=null;
            var loc95=null;
            var loc96=null;
            var loc97=0;
            var loc98=NaN;
            var loc99=null;
            var loc100=0;
            var loc101=0;
            var loc102=0;
            var loc103=null;
            var loc104=0;
            var loc105=0;
            var loc106=null;
            var loc107=0;
            var loc108=null;
            var loc109=0;
            var loc110=null;
            var loc111=0;
            var loc112=0;
            var loc113=null;
            var loc114=null;
            var loc115=null;
            if (arg3 == -1) 
            {
                arg3 = ChatStyle.getChatContentColor();
            }
            if (!arg1) 
            {
                return new Vector.<ChatCellData>();
            }
            arg1 = arg1.replace("\n", "");
            arg1 = arg1.replace("\r", "");
            var loc1=new Vector.<ChatCellData>();
            if (arg1.length == 0) 
            {
                return loc1;
            }
            var loc2=0;
            var loc3=0;
            var loc4=0;
            var loc5=0;
            label12820: while (loc3 < arg1.length - 17) 
            {
                loc5 = (loc3 = arg1.indexOf("<MsgObj>", loc3)) + 8;
                if (loc3 < 0) 
                {
                    break;
                }
                loc8 = new Array<any>();
                if ((loc4 = arg1.indexOf("</MsgObj>", loc5)) < 0) 
                {
                    break;
                }
                if ((loc9 = arg1.substring(loc5, loc4)).length < 0) 
                {
                    loc3 = loc4 + 9;
                    continue;
                }
                loc10 = (loc8 = loc9.split(",")).shift();
                var loc116=loc10;
                switch (loc116) 
                {
                    case "LEVELLIMIT":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc20 = int(loc8[0]);
                        if (Cache.instance.role.entityInfo.level < loc20) 
                        {
                            return new Vector.<ChatCellData>();
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "PLAYER":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc25 = false;
                        if (loc8.length >= 2) 
                        {
                            loc25 = true;
                        }
                        if (!arg4) 
                        {
                            loc18 = int(loc8[0]);
                            if (arg2.length <= loc18) 
                            {
                                return new Vector.<ChatCellData>();
                            }
                        }
                        loc19 = new PlayerMiniInfo(arg2[loc18] as SPublicMiniPlayer);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        if (arg4) 
                        {
                            loc16 = loc8[0];
                            (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc16);
                            loc7.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc7);
                        }
                        else 
                        {
                            (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorPlayer);
                            if (loc25) 
                            {
                                loc7.text = PlayerUtil.getProxyAndName(loc19.miniPlayer);
                            }
                            else 
                            {
                                loc7.text = loc19.playerName;
                            }
                            loc7.data = loc19;
                            loc7.elementFormat = ChatStyle.getRumorPlayerNameFormat(ColorConfig.instance.getCampColor(loc19.camp).intColor, arg6);
                            loc1.push(loc7);
                        }
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "PETBLOOD":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc26 = int(loc8[0]);
                        loc27 = int(loc8[1]);
                        loc28 = PetBloodLineConfig.instance.getName(loc26) + PetBloodLineConfig.instance.getTierName(loc27);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Prefix, loc28);
                        loc7.elementFormat = ChatStyle.getContentFormat(6350622);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "ISLAND":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        (loc29 = new SIslandPos()).isLand = int(loc8[0]);
                        loc29.placeType = int(loc8[1]);
                        loc29.x = int(loc8[2]);
                        loc29.y = int(loc8[3]);
                        loc30 = HTMLUtil.removeHtml(GameDefConfig.instance.getPetIslandName(loc29.isLand));
                        loc31 = ColorConfig.instance.getItemColor(loc29.isLand + 2).intColor;
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Prefix, loc30);
                        loc7.elementFormat = ChatStyle.getContentFormat(loc31);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "PLACETYPE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        (loc32 = new SIslandPos()).isLand = int(loc8[0]);
                        loc32.placeType = int(loc8[1]);
                        loc32.x = int(loc8[2]);
                        loc32.y = int(loc8[3]);
                        loc33 = ColorConfig.instance.getItemColor(loc32.placeType + 2).intColor;
                        loc34 = GameDefConfig.instance.getFigureToLetter(loc32.y + 1) + (loc32.x + 1);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Prefix, loc34);
                        loc7.elementFormat = ChatStyle.getContentFormat(loc33);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "ISLANDPOS":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        (loc35 = new SIslandPos()).isLand = int(loc8[0]);
                        loc35.placeType = int(loc8[1]);
                        loc35.x = int(loc8[2]);
                        loc35.y = int(loc8[3]);
                        loc36 = String(loc8[4]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Islandpos, loc36);
                        loc7.data = loc35;
                        loc7.elementFormat = ChatStyle.getContentFormat(6350622);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "ITEM":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc37 = int(loc8.shift());
                        loc38 = "";
                        if (loc8.length > 0) 
                        {
                            loc38 = loc8.join(",");
                        }
                        (loc39 = new SPlayerItem()).itemAmount = 1;
                        loc39.itemCode = loc37;
                        loc39.jsStr = loc38;
                        loc39.playerId = 0;
                        loc39.posType = 0;
                        loc39.uid = "";
                        loc40 = new ItemData(loc39);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        if (loc40.category != ECategory._ECategoryEquip) 
                        {
                            if (loc40 && loc40.itemInfo) 
                            {
                                loc41 = loc40.itemInfo.item.name;
                            }
                            else 
                            {
                                loc41 = ItemDataWorking.getItemDataName(loc40);
                            }
                        }
                        else 
                        {
                            loc41 = ItemDataWorking.getItemDataName(loc40);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorItem, loc41);
                        loc7.data = loc40;
                        loc7.elementFormat = ChatStyle.getRumorEquipmentFormat(loc40, arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "TRAN":
                    {
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc42 = Language.getString(40646);
                        if (loc8.length > 0 && !(loc8[0] == "")) 
                        {
                            loc42 = loc8[0];
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorTran, loc42);
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "BOSS":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc43 = loc8[0];
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc44 = "【BOSS】" + loc43;
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc44);
                        if (arg5 != EShowArea._EShowAreaRightDown) 
                        {
                            loc7.elementFormat = ChatStyle.getContentFormat(ColorConfig.instance.getRumorColor(6).intColor, arg6);
                        }
                        else 
                        {
                            loc7.elementFormat = ChatStyle.getContentFormat(ColorConfig.instance.getRumorColor(2).intColor, arg6);
                        }
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "CAMP":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc45 = int(loc8[0]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc46 = GameDefConfig.instance.getECamp(loc45);
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc46);
                        loc7.elementFormat = ChatStyle.getContentFormat(ColorConfig.instance.getCampColor(loc45).intColor, arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "CROSSBOSSFIELDFORCE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc47 = int(loc8[0]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc49 = (loc48 = GameDefConfig.instance.getCrossBossFieldDefInfo(loc47)).name;
                        loc24 = parseInt(loc48.text1.substr(1), 16);
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc49);
                        loc7.elementFormat = ChatStyle.getContentFormat(loc24, arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "GUILD":
                    {
                        if (loc8.length < 3) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc50 = int(loc8[0]);
                        loc21 = int(loc8[1]);
                        loc51 = loc8[2];
                        if (loc50 == 0) 
                        {
                            loc11 = loc8[3];
                            loc16 = loc8[4];
                            loc17 = loc8[5];
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        if (loc50 != 0) 
                        {
                            if (loc50 == 1) 
                            {
                                (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorGuild1, loc51);
                                loc7.data = loc21;
                                loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                                loc1.push(loc7);
                            }
                        }
                        else 
                        {
                            (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorGuild, loc51);
                            loc7.data = {"guildId": loc21, "playerId": loc11, "playerName": loc16, "camp": loc17};
                            loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                            loc1.push(loc7);
                        }
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "FASTAPPLYTOGUILD":
                    {
                        if (loc8.length < 3) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc11 = loc8[0];
                        loc16 = loc8[1];
                        loc17 = loc8[2];
                        loc52 = Language.getString(40647);
                        if (loc8.length > 3) 
                        {
                            loc52 = loc8[3];
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc53 = new SPublicMiniPlayer();
                        (loc54 = new SEntityId()).id = loc11;
                        loc53.entityId = loc54;
                        loc53.online = 1;
                        loc53.name = loc16;
                        loc53.camp = loc17;
                        loc55 = new PlayerMiniInfo(loc53);
                        if (Cache.instance.guild.canApply(loc55)) 
                        {
                            (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.FastApplyToGUILD, loc52);
                            loc7.data = loc11;
                            loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                            loc1.push(loc7);
                        }
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "CornucopiaBless":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (SystemSetter.currentSetter.hideCornucopia) 
                        {
                            return new Vector.<ChatCellData>();
                        }
                        loc11 = int(loc8[0]);
                        loc16 = String(loc8[1]);
                        loc56 = Language.getString(40648);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.CornucopiaBless, loc56);
                        loc7.data = {"playerId": loc11, "playerName": loc16};
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "COPY":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc57 = int(loc8[0]);
                        loc58 = loc8[1];
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        if (loc57 != 153) 
                        {
                            (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorCopy, loc58);
                            loc7.data = loc57;
                            loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                            loc1.push(loc7);
                        }
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "TREASURE":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc59 = int(loc8[0]);
                        loc60 = "";
                        loc60 = String(loc8[1]);
                        if (loc59 != 123) 
                        {
                            if (loc59 == 135) 
                            {
                                loc60 = Language.getString(35029);
                            }
                        }
                        else 
                        {
                            loc60 = Language.getString(35028);
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorTreasure, loc60);
                        loc7.data = loc59;
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "GOTOGUILDSTRUGGLE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc61 = String(loc8[0]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GOTOGUILDSTRUGGLE, loc61);
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "GOTOGUILDROBCITYONE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc62 = String(loc8[0]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GOTOGUILDROBCITYONE, loc62);
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "GOTOGUILDELITE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc63 = String(loc8[0]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GOTOGUILDELITE, loc63);
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "GUILDGROUP":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc64 = int(loc8[0]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GUILDGROUP, Language.getString(60678));
                        loc7.data = loc64;
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "EnterGuildAltar":
                    {
                        loc65 = Language.getString(40678);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.EnterGuildAltar, loc65);
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "APPLYTOTEAM":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc66 = Language.getString(40649);
                        loc18 = int(loc8[0]);
                        if (loc8.length > 1) 
                        {
                            loc67 = loc8[1];
                            loc66 = Language.getString(40695);
                        }
                        if (arg2.length <= loc18) 
                        {
                            return new Vector.<ChatCellData>();
                        }
                        loc19 = new PlayerMiniInfo(arg2[loc18] as SPublicMiniPlayer);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorApplyToTeam, loc66);
                        loc7.data = {"copyCode": loc67, "playerInfo": loc19};
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "ACTIVE":
                    {
                        if (loc8.length < 3) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc68 = String(loc8[0]);
                        loc69 = int(loc8[1]);
                        loc23 = String(loc8[2]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorActive, loc23);
                        loc7.data = {"bagTab": loc68, "type": loc69};
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "COLOR":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc70 = int(loc8[0]);
                        loc71 = loc8[1];
                        loc22 = ColorConfig.instance.getRumorColor(loc70);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc71);
                        loc7.elementFormat = ChatStyle.getContentFormat(loc22 ? loc22.intColor : 65280, arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "GUILDPOS":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc72 = int(loc8[0]);
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, "[" + GameDefConfig.instance.getPositionName(loc72) + "]");
                        loc7.elementFormat = ChatStyle.getContentFormat(65280, arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "MAPPOINT":
                    {
                        if (loc8.length < 3) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc73 = Language.getString(40650);
                        loc12 = int(loc8[0]);
                        loc13 = int(loc8[1]);
                        loc14 = int(loc8[2]);
                        loc74 = loc12;
                        loc75 = loc13;
                        loc76 = loc14;
                        if (loc8.length > 3) 
                        {
                            loc73 = loc8[3];
                        }
                        if (loc8.length > 6) 
                        {
                            loc74 = int(loc8[4]);
                            loc75 = int(loc8[5]);
                            loc76 = int(loc8[6]);
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorMapPoint, loc73);
                        loc7.data = {"mapId": loc12, "mapX": loc13, "mapY": loc14};
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorFly);
                        loc7.data = {"mapId": loc74, "mapX": loc75, "mapY": loc76};
                        loc7.elementFormat = ChatStyle.getImageFormat(2, arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "NPC":
                    {
                        if (loc8.length < 4) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc12 = int(loc8[0]);
                        loc13 = int(loc8[1]);
                        loc14 = int(loc8[2]);
                        loc15 = int(loc8[3]);
                        loc23 = NPCConfig.instance.getInfoByCode(loc15).name;
                        if (loc8.length > 4) 
                        {
                            loc23 = String(loc8[4]);
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorNPC, loc23);
                        loc7.data = {"mapId": loc12, "mapX": loc13, "mapY": loc14};
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        (loc77 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorFly);
                        loc77.data = {"mapId": loc12, "mapX": loc13, "mapY": loc14, "npcId": loc15};
                        loc77.elementFormat = ChatStyle.getImageFormat(2, arg6);
                        loc1.push(loc77);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "PET":
                    {
                        if (loc8.length < 5) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc11 = int(loc8[0]);
                        loc78 = loc8[1];
                        loc79 = loc8[2];
                        loc80 = int(loc8[3]);
                        loc81 = int(loc8[4]);
                        loc82 = "";
                        loc83 = "";
                        if (loc80 != 1) 
                        {
                            if (loc80 == 2) 
                            {
                                loc82 = Language.getString(40645);
                            }
                        }
                        else 
                        {
                            loc82 = Language.getString(40644);
                        }
                        loc83 = loc82 + loc79;
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorPet, loc83);
                        loc7.data = {"playerId": loc11, "petUid": loc78};
                        (loc84 = ChatStyle.getRumorLink(arg6)).color = PetColor.getTalentColorByTalent(loc80, loc81).intColor;
                        loc7.elementFormat = loc84;
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "EnterGuildManor":
                    {
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc21 = -1;
                        if (Cache.instance.guild.myGuildInfo) 
                        {
                            loc21 = Cache.instance.guild.myGuildInfo.guildId;
                        }
                        loc85 = Language.getString(40678);
                        if (loc8.length > 0) 
                        {
                            loc21 = int(loc8[0]);
                        }
                        if (loc8.length > 1) 
                        {
                            loc85 = loc8[1].toString();
                        }
                        if (loc21 != -1) 
                        {
                            (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.EnterGuildManor, loc85);
                            loc7.data = loc21;
                            loc7.elementFormat = ChatStyle.getContentFormat(65280, arg6);
                            loc1.push(loc7);
                        }
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "CHARGE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc86 = loc8[0].toString();
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Charge, loc86);
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "JEWELADVANCE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc87 = loc8[0].toString();
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorJewelAdvance, loc87);
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "WUXING":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc88 = int(loc8[0]);
                        loc89 = GameDefConfig.instance.getWuxingName(loc88);
                        loc90 = ColorConfig.instance.getWuxingColor(loc88);
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc89);
                        loc7.elementFormat = ChatStyle.getContentFormat(parseInt(loc90.slice(1), 16), arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "EXPDICE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc91 = loc8[0].toString();
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorEXPDICE, loc91);
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "FASTOPENUI":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        loc92 = loc8[0].toString();
                        loc93 = loc8[1].toString();
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorOPENUI, loc93);
                        loc7.data = loc92;
                        loc7.elementFormat = ChatStyle.getRumorLink(arg6);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "EnterGuildPasture":
                    {
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        loc21 = -1;
                        if (Cache.instance.guild.myGuildInfo) 
                        {
                            loc21 = Cache.instance.guild.myGuildInfo.guildId;
                        }
                        loc94 = Language.getString(40678);
                        if (loc8.length > 0) 
                        {
                            loc21 = int(loc8[0]);
                        }
                        if (loc8.length > 1) 
                        {
                            loc94 = loc8[1].toString();
                        }
                        if (loc21 != -1) 
                        {
                            (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.EnterGuildPasture, loc94);
                            loc7.data = loc21;
                            loc7.elementFormat = ChatStyle.getContentFormat(65280);
                            loc1.push(loc7);
                        }
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "EnterGuildDefense":
                    {
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        loc21 = -1;
                        if (Cache.instance.guild.myGuildInfo) 
                        {
                            loc21 = Cache.instance.guild.myGuildInfo.guildId;
                        }
                        loc95 = Language.getString(40678);
                        if (loc8.length > 0) 
                        {
                            loc21 = int(loc8[0]);
                        }
                        if (loc8.length > 1) 
                        {
                            loc95 = loc8[1].toString();
                        }
                        if (loc21 != -1) 
                        {
                            (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.EnterGuildDefense, loc95);
                            loc7.data = loc21;
                            loc7.elementFormat = ChatStyle.getContentFormat(65280);
                            loc1.push(loc7);
                        }
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "MARKET":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        loc96 = Language.getString(31125);
                        loc97 = int(loc8[0]);
                        loc98 = Number(loc8[1]);
                        if (loc97 != 0) 
                        {
                            if (loc97 == 1) 
                            {
                                loc96 = Language.getString(31126);
                                loc99 = CellDataType.MarketWantSell;
                            }
                        }
                        else 
                        {
                            loc96 = Language.getString(31125);
                            loc99 = CellDataType.MarketWantBuy;
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(loc99, loc96);
                        loc7.data = loc98;
                        loc7.elementFormat = ChatStyle.getRumorLink();
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "UNIT":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        loc100 = int(loc8[0]);
                        loc101 = int(loc8[1]);
                        loc102 = ColorConfig.instance.getRumorColor(2).intColor;
                        if (loc100 == EPrictUnit._EPriceUnitGold) 
                        {
                            loc102 = ColorConfig.instance.getRumorColor(7).intColor;
                        }
                        loc103 = loc101 + GameDefConfig.instance.getEPrictUnitName(loc100);
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc103);
                        loc7.elementFormat = ChatStyle.getContentFormat(loc102);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "PROXYSEVER":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        loc104 = int(loc8[0]);
                        loc105 = int(loc8[1]);
                        loc106 = "[" + EntityUtil.getProxyNameByProxyAndServer(loc104, loc105) + "]";
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc106);
                        loc7.elementFormat = ChatStyle.getContentFormat(ColorConfig.instance.getRumorColor(2).intColor);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "BR":
                    {
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, " ");
                        loc7.elementFormat = ChatStyle.getBRFormat();
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "GRADE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc107 = int(loc8[0]);
                        if (!(loc22 = ColorConfig.instance.getGradeColor(loc107))) 
                        {
                            continue label12820;
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, loc22.colorText);
                        loc7.elementFormat = ChatStyle.getContentFormat(loc22 ? loc22.intColor : 65280);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "VIDEO":
                    {
                        if (loc8.length < 2) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc108 = Language.getString(40693);
                        loc109 = int(loc8[0]);
                        loc110 = String(loc8[1]);
                        if (loc8.length > 2) 
                        {
                            loc108 = String(loc8[2]);
                        }
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.WatchVideo, loc108);
                        loc7.data = {"copyType": loc109, "recordId": loc110};
                        loc7.elementFormat = ChatStyle.getRumorLink();
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "PREFIX":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc111 = int(loc8[0]);
                        if (loc8.length >= 2) 
                        {
                            loc112 = int(loc8[1]);
                        }
                        loc114 = (loc113 = GameDefConfig.instance.getEPrefixx(loc111, loc112)) ? loc113.name : "" + loc111;
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Prefix, loc114);
                        loc7.elementFormat = ChatStyle.getContentFormat(16776960);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    case "DATE":
                    {
                        if (loc8.length < 1) 
                        {
                            loc3 = loc4 + 9;
                            continue label12820;
                        }
                        loc115 = "【" + loc8[0] + "】";
                        if (loc3 > loc2) 
                        {
                            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                            loc6.elementFormat = ChatStyle.getContentFormat(arg3);
                            loc1.push(loc6);
                        }
                        (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Prefix, loc115);
                        loc7.elementFormat = ChatStyle.getContentFormat(65280);
                        loc1.push(loc7);
                        loc3 = loc2 = loc4 + 9;
                        continue label12820;
                    }
                    default:
                    {
                        loc3 = loc4 + 9;
                        continue label12820;
                    }
                }
            }
            if (loc2 < arg1.length) 
            {
                (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2));
                loc6.elementFormat = ChatStyle.getContentFormat(arg3, arg6);
                loc1.push(loc6);
            }
            return loc1;
        }

        public static randomDiceText(arg1: string): string
        {
            return ChatMessageWorking.getDiceText(arg1, Math.ceil(Math.random() * 100));
        }

        public static isDiceText(arg1: string): Boolean
        {
            return arg1.indexOf("<MsgObjDice>") == 0 && arg1.indexOf("</MsgObjDice>") > 0;
        }

        public static getDiceCellData(arg1: string, arg2: int=-1, arg3: int=12): Vector.<ChatCellData>
        {
            var loc1=new Vector.<ChatCellData>();
            var loc2;
            (loc2 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, Language.getString(40652));
            loc2.elementFormat = ChatStyle.getContentFormat(ChatStyle.getDiceColor(), arg3);
            loc1.push(loc2);
            if (arg2 == -1) 
            {
                arg2 = ChatStyle.getChatContentColor();
            }
            arg1 = arg1.replace("<MsgObjDice>", "");
            arg1 = arg1.replace("</MsgObjDice>", "");
            (loc2 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1);
            loc2.elementFormat = ChatStyle.getContentFormat(arg2, arg3);
            loc1.push(loc2);
            return loc1;
        }

        public static getNameByItemData(arg1: ItemData): void
        {
            return;
        }

        public static getNoticeContent(arg1: SPublicNotice): string
        {
            if (!arg1.msgKey) 
            {
                return arg1.content;
            }
            return ChatMessageWorking.getMsgKeyContent(arg1.msgKey, arg1.params);
        }

        public static getHtmlByCellDatas(arg1: Vector.<ChatCellData>): string
        {
            var loc2=null;
            var loc1="";
            var loc3=0;
            while (loc3 < arg1.length) 
            {
                if (!(arg1[loc3].type == CellDataType.RumorTran || arg1[loc3].type == CellDataType.RumorCopy)) 
                {
                    loc2 = HTMLUtil.addColor(arg1[loc3].text, "#" + arg1[loc3].elementFormat.color.toString(16));
                    loc1 = loc1 + loc2;
                }
                ++loc3;
            }
            return loc1;
        }

        public static get chatChannelsData(): Array<any>
        {
            if (!ChatMessageWorking._chatChannelsData) 
            {
                ChatMessageWorking._chatChannelsData = [ChatMessageWorking.worldObj, ChatMessageWorking.countryObj, ChatMessageWorking.unionObj, ChatMessageWorking.teamObj, ChatMessageWorking.sceneObj];
            }
            return ChatMessageWorking._chatChannelsData;
        }

        public static getMsgKeyContent(arg1: string, arg2: Array<any>): string
        {
            var loc2=null;
            var loc8=null;
            var loc9=0;
            var loc1=PropertiesMsgConfig.instance.getInfoByKey(arg1);
            if (loc1) 
            {
                loc2 = loc1.msgValue;
            }
            else 
            {
                return "";
            }
            var loc3="";
            var loc4=0;
            var loc5=0;
            var loc6=0;
            var loc7=0;
            while (loc5 < loc2.length - 4) 
            {
                loc7 = (loc5 = loc2.indexOf("{$", loc5)) + 2;
                if (loc5 < 0) 
                {
                    break;
                }
                if ((loc6 = loc2.indexOf("}", loc7)) < 0) 
                {
                    break;
                }
                if ((loc8 = loc2.substring(loc7, loc6)).length < 0) 
                {
                    loc5 = loc6 + 1;
                    continue;
                }
                if ((loc9 = int(loc8)) < 1 || loc9 > arg2.length) 
                {
                    loc5 = loc6 + 1;
                    continue;
                }
                loc3 = (loc3 = loc3 + loc2.substring(loc4, loc5)) + arg2[(loc9 - 1)];
                loc4 = loc5 = loc6 + 1;
            }
            return loc3 = loc3 + loc2.substring(loc4);
        }

        public static get chatShowAreaData(): Array<any>
        {
            if (!ChatMessageWorking._chatShowAreaData) 
            {
                ChatMessageWorking._chatShowAreaData = [ChatMessageWorking.complexObj, ChatMessageWorking.worldObj, ChatMessageWorking.countryObj, ChatMessageWorking.unionObj, ChatMessageWorking.teamObj, ChatMessageWorking.sceneObj];
            }
            return ChatMessageWorking._chatShowAreaData;
        }

        public static changeToNewBattleField(): void
        {
            chatChannelsData[3] = ChatMessageWorking.forceObj;
            chatChannelsData[4] = ChatMessageWorking.crossObj;
            chatShowAreaData[4] = ChatMessageWorking.forceObj;
            chatShowAreaData[5] = ChatMessageWorking.crossObj;
            return;
        }

        public static changeToGuildGroup(): void
        {
            chatChannelsData[3] = ChatMessageWorking.groupObj;
            chatShowAreaData[4] = ChatMessageWorking.groupObj;
            return;
        }

        public static changeToGuildUnion(arg1: Boolean=false): void
        {
            if (arg1) 
            {
                chatChannelsData[1] = ChatMessageWorking.guildUnionObj;
                chatShowAreaData[2] = ChatMessageWorking.guildUnionObj;
            }
            else 
            {
                chatChannelsData[1] = ChatMessageWorking.countryObj;
                chatShowAreaData[2] = ChatMessageWorking.countryObj;
            }
            return;
        }

        public static changeMap(arg1: Boolean): void
        {
            if (arg1) 
            {
                chatChannelsData[4] = ChatMessageWorking.crossObj;
                chatShowAreaData[5] = ChatMessageWorking.crossObj;
            }
            else 
            {
                chatChannelsData[4] = ChatMessageWorking.sceneObj;
                chatShowAreaData[5] = ChatMessageWorking.sceneObj;
            }
            return;
        }

        public static changeGroup(arg1: Boolean, arg2: Boolean, arg3: Boolean): void
        {
            if (arg1) 
            {
                if (arg2) 
                {
                    chatChannelsData[3] = ChatMessageWorking.crossGroupObj;
                    chatShowAreaData[4] = ChatMessageWorking.crossGroupObj;
                }
                else 
                {
                    chatChannelsData[3] = ChatMessageWorking.crossGroupNoTeamObj;
                    chatShowAreaData[4] = ChatMessageWorking.crossGroupNoTeamObj;
                }
            }
            else if (arg3) 
            {
                chatChannelsData[3] = ChatMessageWorking.teamObj;
                chatShowAreaData[4] = ChatMessageWorking.teamObj;
            }
            else 
            {
                chatChannelsData[3] = ChatMessageWorking.noTeamObj;
                chatShowAreaData[4] = ChatMessageWorking.noTeamObj;
            }
            return;
        }

        
        {
            ChatMessageWorking.complexObj = {"name": Complex, "label": Language.getString(40640)};
            ChatMessageWorking.worldObj = {"name": World, "label": Language.getString(40634)};
            ChatMessageWorking.countryObj = {"name": Country, "label": Language.getString(40635)};
            ChatMessageWorking.unionObj = {"name": Union, "label": Language.getString(40636)};
            ChatMessageWorking.teamObj = {"name": Team, "label": Language.getString(40637)};
            ChatMessageWorking.noTeamObj = {"name": Team, "label": Language.getString(40639)};
            ChatMessageWorking.sceneObj = {"name": Scene, "label": Language.getString(40638)};
            ChatMessageWorking.crossObj = {"name": Scene, "label": Language.getString(40686)};
            ChatMessageWorking.forceObj = {"name": Force, "label": Language.getString(40685)};
            ChatMessageWorking.crossGroupObj = {"name": CrossGrop, "label": CrossGroup};
            ChatMessageWorking.crossGroupNoTeamObj = {"name": CrossGrop, "label": Language.getString(40639)};
            ChatMessageWorking.groupObj = {"name": Group, "label": Language.getString(40700)};
            ChatMessageWorking.guildUnionObj = {"name": GuildUnion, "label": Language.getString(40701)};
        }

        public static get chatShowAllAreaData(): Array<any>
        {
            if (!ChatMessageWorking._chatShowAllAreaData) 
            {
                ChatMessageWorking._chatShowAllAreaData = [{"name": Complex, "label": Language.getString(40640)}, {"name": World, "label": Language.getString(40634)}, {"name": Country, "label": Language.getString(40635)}, {"name": Union, "label": Language.getString(40636)}, {"name": Team, "label": Language.getString(40637)}, {"name": Scene, "label": Language.getString(40638)}, {"name": Force, "label": Language.getString(40685)}, {"name": CrossGrop, "label": CrossGroup}, {"name": Group, "label": Language.getString(40700)}, {"name": GuildUnion, "label": Language.getString(40701)}];
            }
            return ChatMessageWorking._chatShowAllAreaData;
        }

        public static getNameByLabel(arg1: string): string
        {
            var loc2=null;
            var loc1=ChatArea.World;
            var loc3=0;
            var loc4=chatChannelsData;
            for(loc2 of loc4) 
            {
                if (loc2["label"] != arg1) 
                {
                    continue;
                }
                loc1 = loc2["name"];
                break;
            }
            return loc1;
        }

        public static getForcePlayerCellData(arg1: PlayerMiniInfo, arg2: int, arg3: int=12): Vector.<ChatCellData>
        {
            var loc1=0;
            var loc2=new Vector.<ChatCellData>();
            var loc3;
            (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.IMAGE);
            loc3.className = arg1.sexImageName;
            loc3.elementFormat = ChatStyle.getImageFormat(2, arg3);
            loc2.push(loc3);
            var loc4=GameDefConfig.instance.getForceShort(arg2);
            if (GameMapUtil.curMapState.isRobFlag) 
            {
                loc4 = GameDefConfig.instance.getRobFlagForce(arg2);
            }
            else if (GameMapUtil.curMapState.isDominionCopy) 
            {
                loc4 = GameDefConfig.instance.getDominionForceShort(arg2);
            }
            var loc5;
            (loc5 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, "[" + loc4.name + "][" + PlayerUtil.getProxyMsg(arg1.entityId) + "]");
            loc5.elementFormat = ChatStyle.getContentFormat(parseInt(loc4.text1.slice(1), 16), arg3);
            loc2.push(loc5);
            var loc6;
            (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.PLAYER, "[" + arg1.playerName + "]");
            loc1 = ColorConfig.instance.getCampColor(arg1.camp).intColor;
            loc6.elementFormat = ChatStyle.getPlayerNameFormat(loc1, arg3);
            loc6.data = arg1;
            loc2.push(loc6);
            return loc2;
        }

        public static getDiceText(arg1: string, arg2: int): string
        {
            return "<MsgObjDice>" + Language.getStringByParam(40651, arg1, arg2.toString()) + "</MsgObjDice>";
        }

        public static getCellDataByPlayerInfo(arg1: PlayerMiniInfo, arg2: int=-1, arg3: Boolean=false, arg4: int=12): Vector.<ChatCellData>
        {
            var loc6=null;
            var loc7=null;
            var loc8=null;
            var loc9=null;
            var loc10=null;
            if (arg2 == -1) 
            {
                arg2 = ChatStyle.getChatContentColor();
            }
            var loc1=new Vector.<ChatCellData>();
            var loc2;
            (loc2 = ObjectPool.getObject(ChatCellData)).init(CellDataType.IMAGE);
            loc2.className = arg1.sexImageName;
            loc2.elementFormat = ChatStyle.getImageFormat(2, arg4);
            loc1.push(loc2);
            if (arg1.isVIP) 
            {
                (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.VIP);
                loc6.data = arg1.intVIP;
                loc6.className = arg1.vipBitmapName;
                loc6.elementFormat = ChatStyle.getImageFormat(5, arg4);
                loc1.push(loc6);
            }
            if (arg1.isGM) 
            {
                (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GM, "[GM]");
                loc7.elementFormat = ChatStyle.getGMFormat(arg4);
                loc1.push(loc7);
            }
            if (arg1.isGuide) 
            {
                (loc8 = ObjectPool.getObject(ChatCellData)).init(CellDataType.Guide, Language.getString(40641));
                loc8.elementFormat = ChatStyle.getGMFormat(arg4);
                loc1.push(loc8);
            }
            var loc3;
            (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.CAMP, (arg1.isVIP ? "[" : " [") + arg1.campShortName + "]");
            loc3.elementFormat = ChatStyle.getCampFormat(arg1.camp, arg4);
            loc1.push(loc3);
            var loc4="";
            if (!EntityUtil.isSameServerByRole(arg1.entityId)) 
            {
                loc4 = "[" + EntityUtil.getProxyName(arg1.entityId) + "]";
            }
            var loc5;
            (loc5 = ObjectPool.getObject(ChatCellData)).init(CellDataType.PLAYER, loc4 + "[" + arg1.playerName + "]");
            arg2 = ColorConfig.instance.getCampColor(arg1.camp).intColor;
            loc5.elementFormat = ChatStyle.getPlayerNameFormat(arg2, arg4);
            loc5.data = arg1;
            loc1.push(loc5);
            if (arg1.worldPost) 
            {
                (loc9 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, "[" + arg1.worldPost + "]");
                loc9.elementFormat = ChatStyle.getContentFormat(15788607, arg4);
                loc1.push(loc9);
            }
            if (arg3 && arg1.post && !(arg1.post == Language.getString(40642))) 
            {
                (loc10 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, "[" + arg1.post + "]");
                loc10.elementFormat = ChatStyle.getContentFormat(16737010, arg4);
                loc1.push(loc10);
            }
            return loc1;
        }

        /* internal  */static get faceList(): Array<any>
        {
            var loc1=0;
            if (!ChatMessageWorking._faceList) 
            {
                ChatMessageWorking._faceList = new Array<any>();
                loc1 = 72;
                while (loc1 > 0) 
                {
                    ChatMessageWorking._faceList.push("/" + loc1.toString() + " ");
                    ChatMessageWorking._faceList.push("/" + loc1.toString());
                    --loc1;
                }
            }
            return ChatMessageWorking._faceList;
        }

        /* internal  */static get vipFaceList(): Array<any>
        {
            var loc1=0;
            var loc2=0;
            if (!ChatMessageWorking._vipFaceList) 
            {
                ChatMessageWorking._vipFaceList = new Array<any>();
                loc1 = 14;
                while (loc1 > 0) 
                {
                    ChatMessageWorking._vipFaceList.push("/b" + loc1.toString() + " ");
                    ChatMessageWorking._vipFaceList.push("/b" + loc1.toString());
                    --loc1;
                }
                loc2 = 15;
                while (loc2 > 0) 
                {
                    ChatMessageWorking._vipFaceList.push("/c" + loc2.toString() + " ");
                    ChatMessageWorking._vipFaceList.push("/c" + loc2.toString());
                    --loc2;
                }
            }
            return ChatMessageWorking._vipFaceList;
        }

        public static getCellDatas(arg1: string, arg2: Array<any>=null, arg3: Array<any>=null, arg4: int=-1, arg5: int=12, arg6: int=3): Vector.<ChatCellData>
        {
            var loc2=0;
            if (arg4 == -1) 
            {
                arg4 = ChatStyle.getChatContentColor();
            }
            var loc1=new Vector.<ChatCellData>();
            loc1 = ChatMessageWorking.getCellDatasAnalyzeShowItem(arg1, arg2, arg4, arg5);
            var loc3=new Vector.<ChatCellData>();
            loc2 = 0;
            while (loc2 < loc1.length) 
            {
                if (loc1[loc2].type != CellDataType.GENERAL) 
                {
                    loc3.push(loc1[loc2]);
                }
                else 
                {
                    loc3 = loc3.concat(ChatMessageWorking.getCellDatasAnalyzeShowPet(loc1[loc2].text, arg3, arg4, arg5));
                }
                ++loc2;
            }
            var loc4=new Vector.<ChatCellData>();
            loc2 = 0;
            while (loc2 < loc3.length) 
            {
                if (loc3[loc2].type != CellDataType.GENERAL) 
                {
                    loc4.push(loc3[loc2]);
                }
                else 
                {
                    loc4 = loc4.concat(ChatMessageWorking.getCellDataByContent(loc3[loc2].text, arg4, true, arg5, arg6));
                }
                ++loc2;
            }
            var loc5=new Vector.<ChatCellData>();
            loc2 = 0;
            while (loc2 < loc4.length) 
            {
                if (loc4[loc2].type != CellDataType.GENERAL) 
                {
                    loc5.push(loc4[loc2]);
                }
                else 
                {
                    loc5 = loc5.concat(ChatMessageWorking.getCellDatasAnalyzeMapPoint(loc4[loc2].text, arg4, arg5));
                }
                ++loc2;
            }
            return loc5;
        }

        /* internal  */static getCellDatasAnalyzeShowItem(arg1: string, arg2: Array<any>=null, arg3: int=-1, arg4: int=12): Vector.<ChatCellData>
        {
            var loc2=0;
            var loc3=null;
            var loc4=0;
            var loc5=null;
            var loc6=null;
            var loc7=null;
            if (arg3 == -1) 
            {
                arg3 = ChatStyle.getChatContentColor();
            }
            var loc1=new Vector.<ChatCellData>();
            if (arg2 && arg2.length > 0) 
            {
                loc4 = 0;
                while (loc4 < arg2.length) 
                {
                    loc5 = arg2[loc4];
                    loc6 = "[" + loc5.posType + "," + loc5.uid + "]";
                    if ((loc2 = arg1.indexOf(loc6)) >= 0) 
                    {
                        (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.slice(0, loc2));
                        loc3.elementFormat = ChatStyle.getContentFormat(arg3, arg4);
                        loc1.push(loc3);
                        loc7 = "[" + ItemDataWorking.getItemDataName(loc5, false) + "]";
                        (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.EQUIPMENT, loc7);
                        loc3.data = loc5;
                        loc3.elementFormat = ChatStyle.getEquipmentFormat(loc5, arg4);
                        loc1.push(loc3);
                        arg1 = " " + arg1.slice(loc2 + loc6.length);
                        if (arg1.length != 0) 
                        {
                        };
                    }
                    ++loc4;
                }
            }
            if (arg1.length > 0) 
            {
                (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1);
                loc3.elementFormat = ChatStyle.getContentFormat(arg3, arg4);
                loc1.push(loc3);
            }
            return loc1;
        }

        /* internal  */static getCellDatasAnalyzeShowPet(arg1: string, arg2: Array<any>=null, arg3: int=-1, arg4: int=12): Vector.<ChatCellData>
        {
            var loc2=0;
            var loc3=null;
            var loc4=0;
            var loc5=null;
            var loc6=null;
            var loc7=null;
            if (arg3 == -1) 
            {
                arg3 = ChatStyle.getChatContentColor();
            }
            var loc1=new Vector.<ChatCellData>();
            if (arg2 && arg2.length > 0) 
            {
                loc4 = 0;
                while (loc4 < arg2.length) 
                {
                    loc5 = arg2[loc4];
                    loc6 = "[" + EPlayerItemPosType._EPlayerItemPosTypePet + "," + loc5.uid + "]";
                    if ((loc2 = arg1.indexOf(loc6)) >= 0) 
                    {
                        (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.slice(0, loc2));
                        loc3.elementFormat = ChatStyle.getContentFormat(arg3, arg4);
                        loc1.push(loc3);
                        if (loc5.isBorrow) 
                        {
                            loc7 = "[";
                            (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.PET, loc7);
                            loc3.data = loc5;
                            loc3.elementFormat = ChatStyle.getPetFormat(loc5, arg4);
                            loc1.push(loc3);
                            loc7 = Language.getString(40643);
                            (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.PET, loc7);
                            loc3.data = loc5;
                            loc3.elementFormat = ChatStyle.getContentFormat(GlobalStyle.color6Uint, arg4);
                            loc1.push(loc3);
                            loc7 = ChatMessageWorking.getPetName(loc5) + "]";
                            (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.PET, loc7);
                            loc3.data = loc5;
                            loc3.elementFormat = ChatStyle.getPetFormat(loc5, arg4);
                            loc1.push(loc3);
                        }
                        else 
                        {
                            loc7 = ChatMessageWorking.getPetName(loc5);
                            loc7 = "[" + loc7 + "]";
                            (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.PET, loc7);
                            loc3.data = loc5;
                            loc3.elementFormat = ChatStyle.getPetFormat(loc5, arg4);
                            loc1.push(loc3);
                        }
                        arg1 = " " + arg1.slice(loc2 + loc6.length);
                        if (arg1.length != 0) 
                        {
                        };
                    }
                    ++loc4;
                }
            }
            if (arg1.length > 0) 
            {
                (loc3 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1);
                loc3.elementFormat = ChatStyle.getContentFormat(arg3, arg4);
                loc1.push(loc3);
            }
            return loc1;
        }

        /* internal  */static getCellDatasAnalyzeMapPoint(arg1: string, arg2: int=-1, arg3: int=12): Vector.<ChatCellData>
        {
            var loc6=null;
            var loc7=null;
            var loc8=null;
            var loc9=null;
            var loc10=0;
            var loc11=0;
            var loc12=0;
            var loc13=0;
            var loc14=null;
            if (arg2 == -1) 
            {
                arg2 = ChatStyle.getChatContentColor();
            }
            if (!arg1) 
            {
                return new Vector.<ChatCellData>();
            }
            var loc1=new Vector.<ChatCellData>();
            if (arg1.length == 0) 
            {
                return loc1;
            }
            var loc2=0;
            var loc3=0;
            var loc4=0;
            var loc5=0;
            while (loc3 < arg1.length - 7) 
            {
                loc5 = (loc3 = arg1.indexOf("[", loc3)) + 1;
                if (loc3 < 0) 
                {
                    break;
                }
                loc8 = new Array<any>();
                if ((loc4 = arg1.indexOf("]", loc5)) < 0) 
                {
                    break;
                }
                if ((loc10 = (loc9 = arg1.substring(loc5, loc4)).indexOf("[")) >= 0) 
                {
                    loc3 = loc3 + (loc10 + 1);
                    continue;
                }
                if (loc9.length <= 0) 
                {
                    loc3 = loc4 + 1;
                    continue;
                }
                if ((loc8 = loc9.split(",")).length < 3) 
                {
                    loc3 = loc4 + 1;
                    continue;
                }
                loc11 = int(loc8[0]);
                loc12 = int(loc8[1]);
                loc13 = int(loc8[2]);
                if (!(loc14 = new ChatShowPoint(loc11, loc12, loc13)).mapNameString()) 
                {
                    loc3 = loc4 + 1;
                    continue;
                }
                if (loc3 > loc2) 
                {
                    (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2, loc3));
                    loc6.elementFormat = ChatStyle.getContentFormat(arg2, arg3);
                    loc1.push(loc6);
                }
                (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorMapPoint, loc14.mapNameString());
                loc7.data = {"mapId": loc14.mapId, "mapX": loc14.x, "mapY": loc14.y};
                loc7.elementFormat = ChatStyle.getRumorLink(arg3);
                loc1.push(loc7);
                (loc7 = ObjectPool.getObject(ChatCellData)).init(CellDataType.RumorFly);
                loc7.data = {"mapId": loc14.mapId, "mapX": loc14.x, "mapY": loc14.y};
                loc7.elementFormat = ChatStyle.getImageFormat(2, arg3);
                loc1.push(loc7);
                loc3 = loc2 = loc4 + 1;
            }
            if (loc2 < arg1.length) 
            {
                (loc6 = ObjectPool.getObject(ChatCellData)).init(CellDataType.GENERAL, arg1.substring(loc2));
                loc6.elementFormat = ChatStyle.getContentFormat(arg2, arg3);
                loc1.push(loc6);
            }
            return loc1;
        }

        /* internal */ static /* const */maxFaceNum: int=5;

        /* internal */ static /* const */maxVIPFaceNum: int=3;

        public static /* var */complexObj: Object;

        public static /* var */worldObj: Object;

        public static /* var */countryObj: Object;

        public static /* var */unionObj: Object;

        public static /* var */teamObj: Object;

        public static /* var */sceneObj: Object;

        public static /* var */crossObj: Object;

        public static /* var */forceObj: Object;

        public static /* var */crossGroupObj: Object;

        public static /* var */crossGroupNoTeamObj: Object;

        public static /* var */groupObj: Object;

        public static /* var */guildUnionObj: Object;

        /* internal */ static /* var */_chatChannelsData: Array<any>;

        /* internal */ static /* var */_chatShowAreaData: Array<any>;

        /* internal */ static /* var */_chatShowAllAreaData: Array<any>;

        public static /* var */noTeamObj: Object;

        /* internal */ static /* var */_vipFaceList: Array<any>;

        /* internal */ static /* var */_faceList: Array<any>;
    }
